import request from '@/config/axios'

// 经验教训管理 VO
export interface ExperienceVO {
  id: number // 编号
  name: string // 名字
  description: string // 描述
  status: number // 状态
}

// 经验教训管理 API
export const ExperienceApi = {
  // 查询经验教训管理分页
  getExperiencePage: async (params: any) => {
    return await request.get({ url: `/datastore/experience/page`, params })
  },

  // 查询经验教训管理详情
  getExperience: async (id: number) => {
    return await request.get({ url: `/datastore/experience/get?id=` + id })
  },

  // 新增经验教训管理
  createExperience: async (data: ExperienceVO) => {
    return await request.post({ url: `/datastore/experience/create`, data })
  },

  // 修改经验教训管理
  updateExperience: async (data: ExperienceVO) => {
    return await request.put({ url: `/datastore/experience/update`, data })
  },

  // 删除经验教训管理
  deleteExperience: async (id: number) => {
    return await request.delete({ url: `/datastore/experience/delete?id=` + id })
  },

  // 导出经验教训管理 Excel
  exportExperience: async (params) => {
    return await request.download({ url: `/datastore/experience/export-excel`, params })
  },
}